package com.ai.deepseekspring;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

@SpringBootTest
public class RedisText {


    @Autowired
    private RedisTemplate redisTemplate;

    @Test
    public void testRedis() {
//        redisTemplate.opsForValue().set("hello", "world");
        Object hello = redisTemplate.opsForValue().get("hello");

        //redisTemplate.opsForHash().put("hello1", "world", "hello");
        Object o = redisTemplate.opsForHash().get("hello1", "world");
        System.out.println(o);
        System.out.println(hello);

    }

}
